#ifndef QOBJECTLISTVIEW_H
#define QOBJECTLISTVIEW_H

#include <QTreeWidget>

class QFormWidget;

class QObjectListView : public QTreeWidget
{
    Q_OBJECT
public:
    explicit QObjectListView(QWidget *parent = 0);
    
    void    setFormWidget(QFormWidget *formWidget);
signals:
    
public slots:
    void    clickedItem(const QModelIndex &index);

    void    selectChanged(QWidget* wid);

    void    formDestroyed();

    void    widgetAdd(QWidget *wid);
    void    widgetRemove(QWidget* wid);
    void    updateObjectName(QWidget* wid);
protected:
    QFormWidget     *m_formWidget;
    QMap<QWidget*,QTreeWidgetItem*> m_items;
    QMap<QTreeWidgetItem* ,QWidget*>    m_itemToWidget;

    QTreeWidgetItem *m_root;
};

#endif // QOBJECTLISTVIEW_H
